<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

  <head>
    <title>CUSTOM SPRING SECURITY LOGIN</title>
    <script src="/travelsky/js/jquery-1.4.2.min.js"></script>
    <script> 
    	$(document).ready(function(){
    		$('#refresh').click(function()
	        {
	         	 $('#kaptchaImage').attr('src', '/travelsky/kaptcha.jpg?' + Math.floor(Math.random()*100));
	        });
    	});
    </script>
  </head>
  <body onload="document.f.j_username.focus();">
	<P>Valid users:
	<p>
	${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}
    <form name="f" action="${pageContext.request.contextPath}/j_spring_security_check" method="POST">
      <table>
        <tr><td>User:</td><td><input type='text' name='j_username' value= "${sessionScope['SPRING_SECURITY_LAST_USERNAME']}"" /></td></tr>
        <tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
        <tr><td>code:</td><td> <input type="text" id="kaptcha" name="kaptcha" class="input" /></td></tr>
        <tr><td colspan="2">按字符填写，不区分大小写.<span id="refresh"><img id="kaptchaImage" src="/travelsky/kaptcha.jpg" alt="看不清楚,请点击图片" title="看不清楚,请点击图片"/></span></td></tr>
        <tr><td colspan='2'><input name="submit" type="submit"></td></tr>
        <tr><td colspan='2'><input name="reset" type="reset"></td></tr>
      </table>
    </form>
  </body>
</html>
